<template>
  <div class="flex w-full p-4 items-center justify-between bg-white z-1000 sticky top-0">
    <van-icon name="arrow-left" size="20" style="font-weight: bold" @click="back"/>
    <div v-if="title" class="font-bold">{{title}}</div>
    <van-icon name="share-o" size="20" style="font-weight: bold" @click="share"/>
  </div>
</template>

<script lang="ts" setup>
defineProps({
  title: {
    type: String,
    default: ''
  }
})
const emit = defineEmits(['back', 'share'])
const back = () => {
  emit('back')
}
const share = () => {
  emit('share')
}
</script>

<style scoped>

</style>
